package com.wcar.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName tb_station
 */
@TableName(value ="tb_station")
@Data
public class Station implements Serializable {
    /**
     * 工位id
     */
    @TableId(type = IdType.AUTO)
    private Integer station;

    /**
     * 门店表（外键关联门店表）
     */
    private Integer storeId;

    /**
     * 图片url
     */
    private String picture;

    /**
     * 几号库
     */
    private String stationName;

    /**
     * 是否空闲(0 空闲中，1 使用中)
     */
    private String idle;
    @TableField(exist = false)
    private Store store;
    @TableField(exist = false)
    private Integer stationNumber;
    @TableField(exist = false)
    private Integer stationIdle;
    @TableField(exist = false)
    private Integer stationUsed;
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Station other = (Station) that;
        return (this.getStation() == null ? other.getStation() == null : this.getStation().equals(other.getStation()))
            && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId()))
            && (this.getPicture() == null ? other.getPicture() == null : this.getPicture().equals(other.getPicture()))
            && (this.getStationName() == null ? other.getStationName() == null : this.getStationName().equals(other.getStationName()))
            && (this.getIdle() == null ? other.getIdle() == null : this.getIdle().equals(other.getIdle()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getStation() == null) ? 0 : getStation().hashCode());
        result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode());
        result = prime * result + ((getPicture() == null) ? 0 : getPicture().hashCode());
        result = prime * result + ((getStationName() == null) ? 0 : getStationName().hashCode());
        result = prime * result + ((getIdle() == null) ? 0 : getIdle().hashCode());
        return result;
    }

}